public class Demo5{
    public static void main(String[] args) {
        Outer outer = new Outer();
        Outer.Inner inner = outer.new Inner();
        inner.dostuff();
    }
}

class Outer{
    private int size;
    class Inner{
        public void dostuff() {
            size++;
        }
    }
}
